limsQualitycontrolTestResultManageSave.editPage = {

    getGridParam: function () {
        var _this = this;
        return {
            type: 'grid',
            id: 'lims-qualitycontrol-test-result-manage-save-edit-list-grid',
            url: limsQualitycontrolTestResultManageSave.baseUrl + '/queries',
            service: 'limsQualitycontrolTestResultManageSaveServiceImpl',
            dbTable: 'T_LIMS_QUALITYCONTROL_TEST_RESULT_MANAGE_SAVE',
            columns: limsQualitycontrolTestResultManageSave.getEditListColumns(),
            onLoadSuccess: function (data) {
                if (!Gikam.isEmpty(data)) {
                    this.activeRowByIndex(0);
                } else {
                    Gikam.cleanCompData(['lims-qualitycontrol-test-result-manage-save-edit-list-base-info-form']);
                }
            },
            onRowActive: function (index, row) {
            },
            requestData: {
                createdById_EQ: workspace.user.id,
            },
            toolbar: [],
            group: {
                fields: ['groupByCreaterAndId', 'mainBatchCode', 'controlMaterialLevel', 'productName'],
                formatter: function (row) {
                    return Gikam.propI18N("T_LIMS_QUALITYCONTROL_TEST_RESULT_MANAGE.GROUPBYCREATERANDID") + '：' + row.groupByCreaterAndId + ' '
                        + Gikam.propI18N("T_LIMS_QUALITYCONTROL_TEST_RESULT.MAINBATCHCODE") + '：' + row.mainBatchCode + ' '
                        + Gikam.propI18N("T_LIMS_QUALITYCONTROL_TEST_RESULT.CONTROLMATERIALLEVEL") + '：' + row.ext$.codename + ' '
                        + Gikam.propI18N("T_LIMS_QUALITYCONTROLPLAN_PROJECT.PRODUCTNAME") + '：' + row.productName
                },
                expand: true
            },
            order: {
                'groupByCreaterAndId': 'desc',
                'mainBatchCode': 'asc',
                'controlMaterialLevel': 'asc',
                'productName': 'asc',
                'resultSaveTime': 'desc'
            },
            page: true
        }
    },

    create: function () {
        var _this = this;
        Gikam.create('layout', {
            id: 'lims-qualitycontrol-test-result-manage-save-edit-list-layout',
            renderTo: workspace.window.$dom,
            center: {
                items: [this.getGridParam()]
            }
        });
    },

    init: function () {
        this.create();
    }
};
